<?php

namespace App\Service;

use Hyperf\Context\Context;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Contract\RequestInterface;

class ServiceGeneral
{
    #[Inject]
    protected RequestInterface $request;

    public static function getInc()
    {
        $classInstance = Context::get(static::class);
        if (empty($classInstance)) {
            $classInstance = new static();
            Context::set(static::class,$classInstance);
        }
        return $classInstance;
    }
}